package com.example.springdata.lambda;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;

public class TestSupplier {
    public static List getList(Supplier<List> s){
        return s.get();
    }
    public static void main(String[] args) {
        Supplier<List> s=new Supplier<List>(){
            public List get(){
                return new ArrayList<>();
            }
        };

        List list1=s.get();
        List list2=getList(()->new ArrayList());
        List list3=getList(ArrayList::new);
    }
}
